package com.gateway.loadBalance.Random;

import com.gateway.loadBalance.AbstractLoadBalance;
import com.gateway.loadBalance.Invoker;
import com.google.common.collect.Lists;

import java.util.List;

public class Test {
    public static void main(String[]args){
        List<Invoker> invokers = Lists.newArrayList(
                new Invoker("176.170.209.1"),
                new Invoker("176.170.209.2"),
                new Invoker("176.170.209.3"),
                new Invoker("176.170.209.4"),
                new Invoker("176.170.209.5"),
                new Invoker("176.170.209.6"),
                new Invoker("176.170.209.7"),
                new Invoker("176.170.209.8"),
                new Invoker("176.170.209.9"),
                new Invoker("176.170.209.10"));
        AbstractLoadBalance randomLoadBalance = new SimpleRandomLoadBalance(invokers);
        randomLoadBalance.result(20000);
    }
}
